<template>
    <div class="zichan">
        <zongHead iszong="0"></zongHead>
        <div class="zlone">
            <div class="zlleft">
                <img src="@/assets/img/addition/usdt.png" alt="" class="tous" />
                <div class="touxiu">
                    <img src="@/assets/img/addition/xiu.png" alt="" class="gantan" />
                </div>
            </div>
            <div class="zright">
                <div class="zrone">
                    <span class="nicheng">昵称</span>
                    <img src="@/assets/img/addition/xiu.png" alt="" class="nixiu" />
                </div>
                <span class="shouji">157***@UOTlook.com</span>
                <div class="xinrow">
                    <div class="xinleft">
                        <div class="zrone">
                            <span class="nicheng">UID</span>
                            <img src="@/assets/img/addition/fuzhi.png" alt="" class="nixiu" />
                        </div>
                        <span class="snums">56565656565656565656</span>
                    </div>
                    <div class="xinright">
                        <div class="zrone">
                            <span class="nicheng">身份认证</span>
                            <img src="@/assets/img/addition/fan.png" alt="" class="nixiu" />
                        </div>
                        <span class="snums">已认证</span>
                    </div>
                </div>
                <div class="zrone">
                    <span class="nicheng">邮箱</span>
                </div>
                <span class="snums">56565656565656565656</span>
            </div>
        </div>
        <div class="zicontent">
            <div class="zione">
                <div class="znewleft">
                    <div class="zioneleft" v-if="isrenzheng">
                        <div class="zleftone">
                            <span class="zongtit">总资产估值</span>
                            <img src="@/assets/img/addition/yan.png" alt="" class="yan" v-if="iseye"
                                @click="iseye = !iseye" />
                            <img src="@/assets/img/addition/yans.png" alt="" class="yan" v-if="!iseye"
                                @click="iseye = !iseye" />
                            <div class="zhongbi">充币</div>
                            <div class="zhongbis">提币</div>
                        </div>
                        <span class="znum">{{ !iseye ? '0.09' : '***' }}<span class="znums">USDT</span></span>
                        <div class="zjia">
                            <span class="jianum">{{ !iseye ? '-$185.31(-43.16%)' : '******' }}<span
                                    class="bannian">半年</span></span>
                            <div class="zhouview">
                                <div class="zhouitem zhactive">1日</div>
                                <div class="zhouitem">1周</div>
                                <div class="zhouitem">1年</div>
                                <div class="zhouitem">半年</div>
                            </div>
                        </div>
                        <div class="kxian">
                            <div id="main" style="width:100%;height:100%;"></div>
                        </div>
                    </div>
                    <div class="shiview" v-if="!isrenzheng">
                        <div class="yaoview">
                            <img src="@/assets/img/addition/yaobg.png" alt="" class="yaobg" />
                            <div class="yaoitem">
                                <span class="quebao">为确保您的账户安全，请完成身份认证</span>
                                <span class="renshen">认证身份，提升账户安全系数</span>
                                <div class="renbot">
                                    <img src="@/assets/img/addition/renwu.png" alt="" class="renwu" />
                                    <div class="rennav">
                                        <span class="sfrz">身份认证</span>
                                        <span class="xuzhi">需要完成认证后才能购买或充值数字货币</span>
                                    </div>
                                    <div class="quren">
                                        <span class="qurenname">去认证</span>
                                        <img src="@/assets/img/addition/fanlv.png" alt="" class="fanlv" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="zitwo">
                        <div class="zitwotit">
                            市场行情
                        </div>
                        <div class="zitwotittwo">
                            <div class="ztwoitems" :class="istou == 1 ? 'ztacitve' : ''" @click="istouClick(1)">
                                <span class="rengou">自选</span>
                                <span class="renxian"></span>
                            </div>
                            <div class="ztwoitems" :class="istou == 2 ? 'ztacitve' : ''" @click="istouClick(2)">
                                <span class="rengou">主流币</span>
                                <span class="renxian"></span>
                            </div>
                        </div>
                        <div class="ztlist">
                            <div class="zthead">
                                <div class="zones" style="width: 40%;">
                                    <span class="rentit">币种</span>
                                </div>
                                <div class="zones end">
                                    <span class="rentit">最新价/今日涨跌</span>
                                </div>
                                <div class="zones end">
                                    <span class="rentit">24小时成交额</span>
                                </div>
                                <div class="zones end">
                                    <span class="rentit"> 操作</span>
                                </div>

                            </div>
                            <div class="zthead ztitems" v-for="(item, index) in 5" :key="index">
                                <div class="zones center" style="width: 40%;">
                                    <img src="@/assets/img/addition/usdt.png" alt="" class="usdticontwo" />
                                    <span class="biao">BTC</span>
                                    <span class="miao">Bitcoin</span>
                                </div>
                                <div class="zones end">
                                    <div class="zhang">
                                        <span class="rentit">$31,321.00</span>
                                        <span class="rentit lv">+ 0.81%</span>
                                    </div>
                                </div>
                                <div class="zones end">
                                    <span class="rentit">$31,321.00</span>
                                </div>
                                <div class="zones end">
                                    <img src="@/assets/img/addition/dian.png" alt="" class="dianicon" />
                                </div>
                            </div>
                            <div class="chageng">
                                查看更多
                            </div>
                        </div>
                    </div>
                </div>

                <div class="zioneright">
                    <div class="yaoone">
                        <div class="yaoleft">
                            <span class="yatit">邀请好友</span>
                            <span class="yatittwo">邀请您的好友，即可领取奖励</span>
                            <div class="yaojie">
                                <span class="liyao">立即邀请</span>
                                <img src="@/assets/img/addition/fanlv.png" alt="" class="fanlv" />
                            </div>
                        </div>
                        <img src="@/assets/img/addition/hezi.png" alt="" class="hezi" />
                    </div>
                    <div class="gongview">
                        <div class="gone">
                            <span class="gaotit">公告</span>
                            <span class="gengtit">更多</span>
                            <img src="@/assets/img/addition/heifan.png" alt="" class="heifan" />
                        </div>
                        <div class="glist">
                            <div class="gitem" v-for="(item, index) in 5" :key="index">
                                <span class="gtime">2023/11/03</span>
                                <span class="ggong">公告内容公告内容公告内容公告内容</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </div>
</div>
</template>
  
<script>
import { ref } from 'vue';
import Meun from "@/components/menu/meun.vue";
import zongHead from '@/views/property/components/zongHead.vue';
import * as echarts from "echarts";
export default {
    name: "propertyHome",
    components: { zongHead },
    data() {
        return {
            modal1: false,
            ishead: 0,
            iseye: false,
            istou: 2,
            isrenzheng: true,//是否认证样式
        };
    },
    mounted() {
        this.getmain();
    },
    setup() {
    },
    methods: {
        toggleMode(e) {
            // console.log(e)
            this.ishead = e

        },
        istouClick(e) {
            this.istou = e
        },
        getmain() {
            //获取echarts对象 
            let myChart = echarts.init(document.getElementById("main"));
            // 指定图表的配置项和数据
            let option = {
                //表头
                title: {
                    // text: "ECharts 入门示例"
                },
                grid: {
                    top: '10%',//生成的echarts图片和顶部的距离
                    bottom: '0%',//echarts图片和底部的距离
                    left: '-1%',//echarts图片和左边的距离
                    right: '-1%',//echarts图片和右边的间距,
                    containLabel: true//当containLabel:为ture时，以上设置生效
                },

               
                xAxis: {
                    type: 'category', 
                    axisLabel: {//坐标轴刻度标签
                        show: true
                    },
                    axisLine: {//坐标轴轴线
                        show: true,
                        lineStyle: { // X 轴颜色配置
                        color: '#d6d0d0'  
                        } 
                    },
                    axisTick: {//坐标轴刻度
                        show: false
                    },
                    
                    // axisLine: {
                    //     show: false,
                    //     lineStyle: {
                    //         color: '#F3BA0D',
                    //     }
                    // },
                    // axisTick:{
                    //     show: false
                    // },
                    data: ['00:30', '05:20', '05:30', '05:40','00:30', '05:20', '05:30', '05:40']
                },
                
                yAxis: {
                    type: 'value',
                    splitLine: {
                        show: false
                    },
                    axisLine: {
                        show: false, // 不显示坐标轴线
                    },
                    axisLabel: {
                        show: false, // 不显示坐标轴上的文字
                    },
                    axisTick:{
                        show: false
                    },
                },
                series: [
                    {
                        data: [698.74, 500, 400, 393,698.74, 500, 400, 393],
                        // label: {
                        //     show: false,
                        //     position: 'top',
                        //     fontSize: 12,
                        //     color: '#878A8F',
                        //     formatter: function(params) {
                        //         console.log(params)
                        //         return '$'+params.data; // 显示y值
                        //         // 或者：return '(' + params.value[0] + ', ' + params.value[1] + ')';
                        //         // 显示x和y值
                        //     }
                        // },
                        type: 'line',
                        // smooth: true,
                        itemStyle: {
                            color: '#D04963', // 数据点颜色
                        },
                        lineStyle: {color: '#D04963'}
                    }
                ]
            };
            myChart.setOption(option);
            // 使用刚指定的配置项和数据显示图表。
            //定时器主要实现数据的变化echarts的重新渲染
            //删除数据第一项 在最后加一项 
            // setInterval(function () {
            //     var data0 = option.series[0].data;
            //     option.series.map(item => {
            //         item.data.shift();
            //         item.data.push(Math.round(Math.random() * 39 + 1));
            //     });
            //     myChart.setOption(option);
            // }, 2000);
        },
    }
};
//   const ishead = ref('0');
//   const toggleMode = (e) => {
//     ishead.value = e;
//   };
</script>
  
<style lang="scss" scoped>

.zlone {
    padding: 20px 20%;
    background: linear-gradient(90deg, #121212 0%, #2E2E2E 100%);
    display: flex;
    flex-direction: row;

    .zlleft {
        width: 53px;
        height: 53px;
        position: relative;

        .tous {
            position: absolute;
            border-radius: 50%;
            width: 100%;
            height: 100%;
        }

        .touxiu {
            width: 23px;
            height: 23px;
            background: #000000;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            right: -3px;
            bottom: -3px;

            .gantan {
                width: 9px;
                height: 9px;
            }
        }
    }

    .zright {
        display: flex;
        flex-direction: column;
        margin-left: 13px;

        .zrone {
            display: flex;
            flex-direction: row;
            align-items: center;
            cursor: pointer;

            .nicheng {
                font-size: 13px;
                font-family: Source Han Sans CN;
                font-weight: 400;
                color: #999999;
            }

            .nixiu {
                margin-left: 9px;
                width: 10px;
                height: 10px;
            }

            .uid {
                font-size: 10px;
                font-family: Source Han Sans CN;
                font-weight: 400;
                color: #999999;
            }
        }

        .snums {
            font-size: 11px;
            font-family: Source Han Sans CN;
            font-weight: 500;
            color: #FFFFFF;
            display: block;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .shouji {
            font-size: 16px;
            font-family: Source Han Sans CN;
            font-weight: 800;
            color: #FFFFFF;
            display: block;
            margin: 5px 0 10px;
        }

        .xinrow {
            display: flex;
            flex-direction: row;

        }

        .xinright {
            margin-left: 200px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
    }
}

.zicontent {
    padding: 28px 20%;
    display: flex;
    flex-direction: column;

    .zione {
        display: flex;
        flex-direction: row;

        .znewleft {
            width: 66%;
        }
        .shiview{
            margin-bottom: 13px;
            .yaoview{
                width: 100%;
                height: 160px;
                position: relative;
                .yaobg{
                    position: absolute;
                    width: 100%;
                    height: 100%;
                }
                .yaoitem{
                    position: relative;
                    display: flex;
                    flex-direction: column;
                    padding: 30px 24px;
                    .quebao{
                        font-size: 19px;
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        color: #000000;
                    }
                    .renshen{
                        font-size: 12px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #666666;
                        display: block;
                        margin: 14px 0 19px 0;
                    }
                    .renbot{
                        display: flex;
                        flex-direction: row;
                        align-items: center;
                        .renwu{
                            width: 15px;
                            height: 14px;
                            margin-right: 8px;
                        }
                        .rennav{
                            width: 60%;
                            display: flex;
                            flex-direction: column;
                            .sfrz{
                                font-size: 12px;
                                font-family: Source Han Sans CN;
                                font-weight: 500;
                                color: #000000;
                            }
                            .xuzhi{
                                font-size: 9px;
                                font-family: Source Han Sans CN;
                                font-weight: 400;
                                color: #666666;
                            }
                        }
                        .quren{
                            margin-left: auto;
                            cursor: pointer;
                            .qurenname{
                                font-size: 11px;
                                font-family: Source Han Sans CN;
                                font-weight: 400;
                                color: #27B554;
                            }
                            .fanlv{
                                width: 5px;
                                height: 8px;
                                margin-left: 8px;
                            }
                        }
                    }
                }
            }
        }

        .zioneleft {
            border: 1px solid #EEEEEE;
            border-radius: 4px;
            padding: 30px 21px;
            margin-bottom: 28px;
            // width: 520px;

            .zleftone {
                display: flex;
                flex-direction: row;
                align-items: center;

                // width: 100%;
                .zongtit {
                    font-size: 18px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #111111;
                    display: inline-block;
                    margin-right: 10px;
                }

                .yan {
                    width: 19px;
                    height: 12px;
                    cursor: pointer;
                }

                .zhongbi {
                    width: 58px;
                    height: 24px;
                    background: #030000;
                    border-radius: 12px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 13px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #FFFFFF;
                    margin-left: auto;
                    margin-right: 16px;
                    cursor: pointer;
                }

                .zhongbis {
                    width: 58px;
                    height: 24px;
                    border: 1px solid #CCCCCC;
                    border-radius: 12px;
                    font-size: 13px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #030000;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                }
            }

            .znum {
                font-size: 27px;
                font-family: Source Han Sans CN;
                font-weight: bold;
                color: #111111;
                display: block;
                margin: 9px 0 9px;

                .znums {
                    font-size: 19px;
                    font-weight: 400;
                    display: inline-block;
                    margin-left: 5px;
                }
            }

            .zjia {
                display: flex;
                flex-direction: row;
                align-items: center;

                .jianum {
                    font-size: 16px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #D04963;
                }

                .bannian {
                    display: inline-block;
                    color: #8B8B8B;
                    margin-left: 5px;
                }

                .zhouview {
                    margin-left: auto;
                    width: 190px;
                    height: 32px;
                    background: #F0F0F0;
                    border-radius: 4px;
                    padding: 3px;
                    display: flex;
                    flex-direction: row;
                    cursor: pointer;

                    .zhouitem {
                        width: 25%;
                        height: 100%;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 11px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #030000;
                    }

                    .zhactive {
                        background: #FFFFFF;
                        border-radius: 4px;
                        font-weight: 400;
                        color: #030000;
                    }
                }
            }

            .kxian {
                height: 200px;
                margin: 30px 0;
            }
        }

        .zioneright {
            width: 32%;
            margin-left: 2%;

            .yaoone {
                border: 1px solid #E5E7E7;
                border-radius: 1px;
                padding: 15px;
                display: flex;
                flex-direction: row;
                align-items: center;

                .yaoleft {
                    display: flex;
                    flex-direction: column;

                    .yatit {
                        font-size: 11px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #999999;
                    }

                    .yatittwo {
                        font-size: 12px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #000000;
                        display: block;
                        margin: 6px 0 12px;
                    }

                    .yaojie {
                        cursor: pointer;
                        display: flex;
                        flex-direction: row;
                        align-items: center;

                        .liyao {
                            font-size: 12px;
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            color: #27B554;
                        }

                        .fanlv {
                            width: 4px;
                            height: 8px;
                            margin-left: 8px;
                        }
                    }
                }

                .hezi {
                    margin-left: auto;
                    width: 50px;
                    height: 45px;
                }
            }

            .gongview {
                border: 1px solid #E5E7E7;
                border-radius: 1px;
                margin-top: 14px;
                padding: 12px 16px;

                .gone {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    border-bottom: 1px solid #E5E7E7;
                    padding-bottom: 13px;
                    cursor: pointer;

                    .gaotit {
                        font-size: 16px;
                        font-family: Source Han Sans CN;
                        font-weight: 500;
                        color: #000000;
                    }

                    .gengtit {
                        font-size: 11px;
                        font-family: Source Han Sans CN;
                        font-weight: 400;
                        color: #000000;
                        display: inline-block;
                        margin-left: auto;
                        margin-right: 6px;
                    }

                    .heifan {
                        width: 4px;
                        height: 8px;
                    }
                }

                .glist {
                    display: flex;
                    flex-direction: column;

                    .gitem {
                        display: flex;
                        flex-direction: column;
                        padding: 11px 0;
                        cursor: pointer;
                        border-bottom: 1px solid #E5E7E7;

                        .gtime {
                            font-size: 8px;
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            color: #999999;
                        }

                        .ggong {
                            font-size: 9px;
                            font-family: Source Han Sans CN;
                            font-weight: 400;
                            color: #000000;
                            display: block;
                            margin-top: 5px;
                        }
                    }
                }
            }

            .zrlist {
                display: flex;
                flex-direction: row;
                align-items: center;
                margin-bottom: 15px;

                .usdt {
                    width: 20px;
                    height: 20px;
                    margin-right: 4px;
                }

                .usdtit {
                    font-size: 11px;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    color: #000000;
                }

                .usdnum {
                    margin-left: auto;
                    margin-right: 60px;
                }

                .dian {
                    width: 11px;
                    height: 3px;
                }
            }
        }
    }

    .zitwo {
        border: 1px solid #EEEEEE;
        border-radius: 3px;
        // margin-top: 27px;
        width: 100%;
        padding: 20px 24px 0 24px;

        .zitwotit {
            font-size: 16px;
            font-family: Source Han Sans CN;
            font-weight: 500;
            color: #000000;
            // margin: 15px 0;
            // padding: 15px 0px;
            padding-bottom: 14px;
            // border-bottom: 1px solid #EEEEEE;
        }

        .zitwotittwo {
            font-size: 16px;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: #000000;
            // margin: 15px 0;
            // padding: 15px 24px;
            border-bottom: 1px solid #EEEEEE;
            display: flex;
            flex-direction: row;

            .ztwoitems {
                height: 100%;
                margin-right: 30px;
                font-size: 15px;
                font-family: Source Han Sans CN;
                font-weight: 500;
                color: #999999;
                display: flex;
                align-items: center;
                justify-content: center;
                position: relative;
                padding: 16px 0;
                cursor: pointer;
            }

            .renxian {
                position: absolute;
                width: 100%;
                bottom: 0;
                left: 0;
                height: 1px;
                background: #030000;
                display: none;
            }

            .ztacitve {
                font-weight: 500;
                color: #000000;

                .renxian {
                    display: inline-block;

                }
            }
        }

        .ztlist {

            // padding:0 15px;
            // padding: 30px 0;
            .zthead {
                display: flex;
                flex-direction: row;
                // margin-bottom: 38px;
                padding: 22px 0;
                border-bottom: 1px solid #EEEEEE;

                .zones {
                    width: 20%;
                    display: flex;
                    flex-direction: row;
                }

                .zonetwos {
                    width: 12.5%;
                    display: flex;
                    flex-direction: row;
                }

                .usdticon {
                    width: 18px;
                    height: 18px;
                }

                .miao {
                    font-size: 11px;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    color: #999999;
                }

                .center {
                    align-items: center;
                }

                .biao {
                    display: inline-block;
                    margin: 0 3px 0 7px;
                }

                .end {
                    justify-content: flex-end;

                    .rentit {
                        padding-right: 3px;
                    }
                }

                .rentit {
                    font-size: 13px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #8B8B8B;
                }

                .hong {
                    font-weight: 400;
                    color: #EF5252 !important;
                }

                .usdticontwo {
                    width: 23px;
                    height: 23px;
                    // margin-right: 5px;
                }

                .center {
                    align-items: center;
                }

                .shuhui {
                    width: 47px;
                    height: 23px;
                    border: 1px solid #030000;
                    border-radius: 12px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 9px;
                    font-family: Source Han Sans CN;
                    font-weight: 400;
                    color: #000000;
                }

                .lv {
                    color: #31BD65 !important;
                }

                .zhang {
                    display: flex;
                    flex-direction: column;
                    align-items: flex-end;
                }

                .dianicon {
                    width: 14px;
                    height: 3px;
                    cursor: pointer;
                }
            }

            .ztitems {
                display: flex;
                flex-direction: row;
                align-items: center;

                .rentit {
                    font-size: 14px;
                    font-family: Source Han Sans CN;
                    font-weight: 500;
                    color: #000000;
                }

                .end {
                    justify-content: flex-end;

                    .rentit {
                        padding-right: 0px;
                    }
                }
            }

            .ztitems:last-child {
                border-bottom: none;
            }
        }

        .chageng {
            padding: 16px 0 16px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-family: Source Han Sans CN;
            font-weight: 500;
            text-decoration: underline;
            color: #000000;
            cursor: pointer;
        }
    }
}

.xiaclass {
    position: relative;
    top: 4px !important;
}</style>